package com.demo.member;

import com.demo.AppletConstant;
import com.demo.util.Utils;
import com.google.gson.Gson;

import java.util.HashMap;
import java.util.Map;

public class QueryUpCardNo {

    public static void main(String[] args) {

        String resultStr = queryUpCard();

        System.out.println("-------获取queryUpCard信息:"+resultStr+"---------");

    }

    public static String queryUpCard(){
        //调用地址
        String url = "https://open.95516.com/open/access/1.0/queryUpCard";
        //拼装参数Map
        Map<String, String> params = new HashMap<String, String>(0);
        params.put("appId", AppletConstant.APP_ID);
        params.put("backendToken", AppletConstant.backendToken);

        params.put("cardTemplateId", "");

        params.put("openId", AppletConstant.openId);
        System.out.println("生成入参和签名："+params);
        //发送请求
        String resultStr = Utils.sendPostGson(url, params);
        return resultStr;
    }

}
